<link rel="stylesheet" href="/public/admin/newadmin/css/dev.css">
<style type="text/css">
/*图片列表*/
body {background="";}
.clear{ clear: both; font-size:1px; height:0; line-height: 0px;}
.list .photo{padding:2px; border:1px #ccc solid; width:80px; height:80px;}
.list a:hover img{border:1px #B4DEF9 solid;}
.list div{width:100px; float:left;margin-right:5px;margin-top:10px;text-align:center; overflow:hidden;}
.list span {display:block;}
.imgicon2{float:left;clear: both;margin:20px 0 10px 10px;}
.redstyle{color:red; font-size:14px;font-weight:bolder;}
.greenstyle{color:green; font-size:12px;font-weight:bolder;}
.softcheckbox{ float:left; width:90px;}
.points{cursor:pointer;}
.moveleft,.moveright{ font-size:18px;font-weight:bolder;}
#recommend_num{ color:red}
/*.error_box {
    background-color: #FFDBDB;
    border: 1px solid #EE2037;
}*/
.uploadify-button {
    background-color: transparent;
    border: none;
    padding: 0;
}
.uploadify:hover .uploadify-button {
    background-color: transparent;
}
</style> 

<form id="applyform" name="applyform" action="" method="post" onsubmit="return checkadd();">
        <div class="info_line"><h3>开发者信息</h3></div>     
        <table class="table updata_tab">
			<tbody>   
                <tr>
		<td class="apply_label">会员的UID:</td>
                    <td class="altbg2"  >
                       <input type="text" name="uid" id="uid" value="<?php echo $this->result['uid']?>"  size="30" class="ipt"> 
                       <input id="trustee" name="trustee" type="checkbox" value="1" /><label for="trustee">官方托管</label>
                       <span style="float:right">
                       <label for="softtype1"><input class='np' type='radio' name='softtype' id='softtype1' value='1' checked="checked" />&nbsp;正常软件</label>&nbsp;&nbsp;&nbsp;
	                   <label for="softtype2"><input class='np' type='radio' name='softtype' id='softtype2' value='2' />&nbsp;汉化软件</label>&nbsp;&nbsp;&nbsp;
	                   <label for="softtype3"><input class='np' type='radio' name='softtype' id='softtype3' value='3' />&nbsp;其他软件</label>&nbsp;&nbsp;&nbsp;
	                   <label for="softtype4"><input class='np' type='radio' name='softtype' id='softtype4' value='4' />&nbsp;旧开发者接口软件</label>&nbsp;&nbsp;&nbsp;
	                   <label for="softtype5"><input class='np' type='radio' name='softtype' id='softtype5' value='5' />&nbsp;DEDE重复软件较低版本</label>&nbsp;&nbsp;&nbsp;
                       </span>
                    </td>
                 </tr>  
            </tbody>
        </table>         		
		
		<div class="info_line"><h3>1.基本信息</h3></div>
		<p class="new_prompt">请上传目前发布的最新版本</p>
		
		<input name="sid" id="sid" type="hidden" value="<?php echo $this->result['id']?>" />
		<input name="id"  type="hidden" value="<?php echo $this->result['id']?>" />
		<input name="historysid" id="historysid" type="hidden" value="<?php echo $this->result['sid']?>" />
		<table class="table updata_tab">
			<tbody>
			
			    <tr>
                    <td class="apply_label">上传方式：</td>
                    <td>
            	        HTTP上传：<input name="uploadtype" value="2" type="radio" id="uploadhttp" checked="checked" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        FTP 上传：<input name="uploadtype" value="1" type="radio" id="uploadftp" />
                    </td>
                </tr>
                <!-- ftp选取本地地址 -->
                <tr id="upload_ftp" style="display: none">
                    <td class="apply_label"><em class="must">*</em>本地地址：</td>
                    <td>
            	        <input name="softurl1" type="text" id="softurl1" style="width:600px" class="ipt" onblur='focus_v()'/>
                        <img src='http://dev.mumayi.com/public/images/devload.gif' width=30 height=30 id='loadimg' style="display:none">
                        <br/>
                        <input  onclick="getlargefile()" value="获取远程大文件"  type="button">
                        <input  onclick="getyfile()" value="获取远程大文件(需VPN)"  type="button">
                        <input name="sel1" type="button" id="sel1" value="选取" onClick="getFtpDir()" />
			            <input name="sel1" type="button" id="sel1" value="重新获取软件大小权限等。。。" onClick="ReturnsoftValue()" />
                        <input  onclick="getlargefile163()" value="获取（new）"  type="button">
                    </td>
                </tr>
                <!-- ftp选取本地地址 -->
			
		<tr id="upload_http">
				<td class="apply_label"><em class="must">*</em>安装包：</td>
				<td>
                           
	                    <div class="imgicon">
	                         <div id="fileQueue"></div>
		                    <div id="uploadicons">
		                        <input type="hidden" readonly=""  class="ipt" value="0"   id="apk_filename"  name="apk_filename">
		                        <span  id="downloadurl"> </span>	            
		                        <input type="hidden" id="downloadurl_url"  name="downloadurl_url">
                                <input type="hidden" id="downloadurlto"  name="downloadurlto">
                                <input type="hidden" id="datedir"  name="datedir">
								<span class="f_prompt" id="apk"></span>
		                    </div>
	                    </div>
	                    <div class="list" id="photolists"></div>
	                    <div id="adinfo">
                    </td>
                </tr>
		<tr>
		<td class="apply_label"><em class="must">*</em>应用名称：</td>
                    <td class="altbg2"  >
                        <input type="text" name="title" id="title"  value="<?php echo $this->result['title']?>"  style="width:600px" class="ipt">                      
				<span class="f_prompt" id="msg_title"></span>
                    </td>
                 </tr>   

		<tr>
                    <td class="apply_label"><em class="must">*</em>应用版本：</td>
                    <td class="altbg2"  >
                    <?php if($this->sid):?>
                        <input type="text" name="versionname" id="versionname" value="<?php echo $this->result['versionname']?>" class="ipt">
                        <span class="f_prompt" id="msg_versionname"></span>   
                        <input type="hidden" name="permission" id="permission" value='<?php echo $this->result['permission']?>'>
                        <!--<input type="hidden" name="md5" id="md5" value="<?php echo $this->result['md5']?>" >-->
                        <input type="hidden" name="apkad" id="apkad"  value="<?php echo $this->result['apkad']?>">
                        <input type="hidden" name="adcanal" id="adcanal"  value="<?php echo $this->result['adcanal']?>">
                        
                    <?php else:?>
                    	<input type="text" name="versionname" id="versionname" value=""  class="ipt">
                        <span class="f_prompt" id="msg_versionname"></span>   
                        <input type="hidden" name="permission" id="permission" value=""  >
                        <input type="hidden" name="apkad" id="apkad"  value="">
                        <input type="hidden" name="adcanal" id="adcanal"  value="">
                    <?php endif;?>
                        
                        其他名/英文名：
                        <input type="text" name="alias" id="alias" style="width:260px" value="<?php echo $this->result['alias']?>" class="ipt">   
                    </td>
                </tr> 
               
                <tr>
		<td class="apply_label">软件包名：</td>
                    <td class="altbg2"  >
                        <input type="text" name="packagename" id="packagename" style="width:200px" value="<?php echo $this->result['packagename']?>"  class="ipt">
                       版本CODE： <input type="text" name="versioncode" id="versioncode" style="width:50px"value="<?php echo $this->result['versioncode']?>"  class="ipt">&nbsp;&nbsp;
                       SDK版本： <input type="text" name="sdkversion" id="sdkversion" style="width:50px" value="<?php echo $this->result['sdkversion']?>"  class="ipt">&nbsp;&nbsp;
                       软件大小：<input type="text" name="softsize" id="softsize" style="width:100px" value="<?php echo $this->result['softsize']?>" class="ipt">
                      
                    </td>
                </tr> 
                 <tr>
					<td class="apply_label">软件属性：</td>
                    <td class="altbg2"  >
                     DEV文件MD5：<input type="text" name="md5" id="md5" style="width:300px"  value="<?php echo $this->result['md5']?>"  class="ipt">  
                     DEDE文件MD5：<input type="text" name="dedemd5" id="dedemd5" style="width:300px"  value="<?php echo $this->result['dedemd5']?>"  class="ipt">  
                                                                               
                        <br/>
                         软件签名MD5：<input type="text" name="signmd5" id="signmd5" style="width:500px"  value="<?php echo $this->result['signmd5']?>"  class="ipt">
          <br/>              
                         软件签名SHA1：<input type="text" name="signsha1" id="signsha1" style="width:500px"  value="<?php echo $this->result['signsha1']?>"  class="ipt">                    
						
                     <br/> <span class="f_prompt" id="msg_icon_filename"><i class="icon i_s_plaint"></i>注：编辑可以不填写上面8个属性,上传包程序会自动取</span>
                    </td>
                 </tr>
                
               <tr>
					<td class="apply_label"><em class="must">*</em>图标：</td>
					<td>
                        <div class="imgicon">
                            <div id=fileIcon></div>
                            <div class="dib chose_file">
                            <div id="fileposter"></div>
                            <div id="uploadposter">
                                <input type="hidden" readonly=""  class="ipt" value="0"   id="icon_filename"  name="icon_filename">
		                        <input type="text" size="10"   id="icon"  name="icon" >
		                        <?php if($this->sid):?>
		                        	<input type="hidden" size="10" value="0"   id="icon_url"  name="icon_url" >
		                        <?php else:?>
		                         	<input type="hidden" size="10" value=""   id="icon_url"  name="icon_url" >
		                        <?php endif;?>
                            </div>
                        </div>
                        <span class="f_prompt" id="msg_icon_filename"><i class="icon i_s_plaint"></i>注意：图标大小必须为72*72到150*150之间的PNG图片</span>
                        </div>
                       
                                             <ul>
									<li id="iconlists">
                                               <img height="36" width="36" src="<?php echo $this->result['icon']?>">
                                                                    <img height="48" width="48" src="<?php echo $this->result['litpicM']?>">
                                                                        <img height="72" width="72" src="<?php echo $this->result['litpicH']?>"></li>							
						</ul>
                    </td>
                </tr>
<?php if($this->sid):?>
				
                <tr>
					<td class="apply_label"><em class="must">*</em>类型：</td>
					<td class="City_sel_area">
                        <input type="hidden" id="type"  name="type" value="<?php echo $this->result['reid']?>">
					    <input type="hidden" id="cid"  name="cid" value="<?php echo $this->result['cid']?>">
					   
					    <div class="DFl p_rel province type"><span id="softtype"  style="width: 142px"><?php echo $this->result['toptypename'];?></span><span class="dib icons mn_so"></span>
							<ul class="p_abs City_list type_list layer0" style="height:60px;">
								<li onclick="stype($(this).html(),3)">应用</li>
                                <li onclick="stype($(this).html(),6)">游戏</li>
							</ul>
						</div>	
						<?php
                        $where='reid='.$this->result['reid'];
                        $order='id';
                        $this->arctype=new Arctype();
                        $arctype=$this->arctype->getArctypeTypename($where,$order);
                        if(is_array($arctype))foreach($arctype as $keys=>$array){
                        $arctype['typename'][$keys]=$arctype[$keys]['typename'];
                        $arctype['id'][$keys]=$arctype[$keys]['id'];
                        }
                     ?>					
						<div class="DFl p_rel city type"><span id="ctype"> <?php  for($i=0;$i<count($arctype['typename']);$i++)
                            {   if($this->result['typename']==$arctype['id'][$i]) {echo $arctype['typename'][$i];  } }  ?></span><span class="dib icons mn_so"></span>
							<ul class="p_abs City_list type_list layer1" id='subcategories'>
							<?php  for($i=0;$i<count($arctype['typename']);$i++)
                            { echo '<li onclick="ctype($(this).html(),'.$arctype['id'][$i].')">'.$arctype['typename'][$i].'</li>';}  ?>
                            </ul>
                        </div>
                        <span id="msg_type"></span> 
                    </td>
                 </tr>
<?php else:?>
                <tr>
					<td class="apply_label"><em class="must">*</em>类型：</td>
					<td class="City_sel_area">
					<input type="hidden" id="type"  name="type" value="">
					<input type="hidden" id="cid"  name="cid" value="">
					    <div class="DFl p_rel province type menu0"><span id="softtype"> -请选择分类- </span><span class="dib icons mn_so"></span>
							<ul class="p_abs City_list type_list layer0" style="height:60px;">
								<li onclick="stype($(this).html(),3)">应用</li>
                                <li onclick="stype($(this).html(),6)">游戏</li>
							</ul>
						</div>
                        <div class="DFl p_rel city type menu1"><span id="ctype"> -请选择分类- </span><span class="dib icons mn_so"></span>
                            <ul class="p_abs City_list type_list layer1" id='subcategories'>
                            </ul>
                        </div>
                        <span class="f_prompt" id="msg_type"></span> 
                    </td>
                 </tr>
                 
<?php endif;?>
                 <tr>
				    <td class="apply_label"><em class="must">*</em>支持系统：</td>
                    <td id="phonesystem_checkbox">
                        <span class="ipt_check">
							<span class="points">Android</span>
							<i class="check<?php if(in_array(1,$this->result['system'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="phonesystem[]"  style="display:none;" value="1"<?php if(in_array(1,$this->result['system'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
							<span class="points">Ophone</span>  
							<i class="check<?php if(in_array(2,$this->result['system'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="phonesystem[]"  style="display:none;" value="2"<?php if(in_array(2,$this->result['system'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
							<span class="points">Lephone</span>
							<i class="check<?php if(in_array(3,$this->result['system'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="phonesystem[]"  style="display:none;" value="3"<?php if(in_array(3,$this->result['system'])&&$this->sid){?> checked="checked"<?php } ?>/>  
						
						<span class="ipt_check checkall" >
							<span class="points">全部</span>
							<i class="check"></i>
						</span>
						<input type="checkbox" name="allphonesystem"   style="display:none;"  class="checkall" value="全部"/>
                    </td>
                </tr>
                
                <tr>
				    <td class="apply_label"><em class="must">*</em>支持系统的版本号：</td>
                    <td id="os_checkbox">
                        <span class="ipt_check">
							<span class="points">1.5</span>
							<i class="check<?php if(in_array(1,$this->result['os'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"   style="display:none;" value="1"<?php if(in_array(1,$this->result['os'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
							<span class="points">1.6</span>
							<i class="check<?php if(in_array(2,$this->result['os'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"  style="display:none;" value="2"<?php if(in_array(2,$this->result['os'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
                            <span class="points">2.0</span>
							<i class="check<?php if(in_array(3,$this->result['os'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"  style="display:none;" value="3"<?php if(in_array(3,$this->result['os'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
                                <span class="ipt_check">                
                            <span class="points">2.1</span>
							<i class="check<?php if(in_array(6,$this->result['os'])){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"  style="display:none;" value="6"<?php if(in_array(6,$this->result['os'])){?> checked="checked"<?php } ?>/>
				
                                                <span class="ipt_check">
                            <span class="points">2.2</span>
							<i class="check<?php if(in_array(7,$this->result['os'])){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"  style="display:none;" value="7"<?php if(in_array(7,$this->result['os'])){?> checked="checked"<?php } ?>/>
						
                                                                 
                                                
						<span class="ipt_check">
                            <span class="points">2.3.x</span>
							<i class="check<?php if(in_array(4,$this->result['os'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"  style="display:none;" value="4"<?php if(in_array(4,$this->result['os'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
                                                
						<span class="ipt_check">
                                                    
                            <span class="points">4.0.x</span>
							<i class="check<?php if(in_array(5,$this->result['os'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"  style="display:none;" value="5"<?php if(in_array(5,$this->result['os'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
                                              <span class="ipt_check">
                            <span class="point">4.1.x</span>
							<i class="check<?php if(in_array(8,$this->result['os'])){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="os[]"  style="display:none;" value="8"<?php if(in_array(8,$this->result['os'])){?> checked="checked"<?php } ?>/>
						           
                                                <span class="ipt_check checkall">
							<span class="points">全部</span>
							<i class="check<?php if(count(array_diff(array(1,2,3,4,5,6,7,8),$this->result['os']))==0){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="allos" style="display:none;" <?php if(count(array_diff(array(1,2,3,4,5,6,7,8),$this->result['os']))==0){?> checked="checked"<?php } ?> value="全部"/>
                    </td>
                </tr>
                
                <tr>
				    <td class="apply_label"><em class="must">*</em>支持设备分辨率：</td>
					<td id="resolution_checkbox">
					    <span class="ipt_check">
                            <span class="points">240*320</span>
							<i class="check<?php if(in_array(1,$this->result['resolution'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="resolution[]" style="display:none;" value="1"<?php if(in_array(1,$this->result['resolution'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
                            <span class="points">320*480</span>
							<i class="check<?php if(in_array(2,$this->result['resolution'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="resolution[]" style="display:none;" value="2"<?php if(in_array(2,$this->result['resolution'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
                            <span class="points">480*640</span>
							<i class="check<?php if(in_array(3,$this->result['resolution'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="resolution[]" style="display:none;" value="3"<?php if(in_array(3,$this->result['resolution'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
                            <span class="points">480*800</span>
							<i class="check<?php if(in_array(4,$this->result['resolution'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="resolution[]" style="display:none;" value="4"<?php if(in_array(4,$this->result['resolution'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
                            <span class="points">480*854</span>
							<i class="check<?php if(in_array(5,$this->result['resolution'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="resolution[]" style="display:none;" value="5"<?php if(in_array(5,$this->result['resolution'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
                            <span class="points">960*600</span>
							<i class="check<?php if(in_array(6,$this->result['resolution'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="resolution[]" style="display:none;" value="6"<?php if(in_array(6,$this->result['resolution'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check">
                            <span class="points">1024*600</span>
							<i class="check<?php if(in_array(7,$this->result['resolution'])&&$this->sid){?> check_on<?php } ?>"></i>
						</span>
						<input type="checkbox" name="resolution[]" style="display:none;" value="7"<?php if(in_array(7,$this->result['resolution'])&&$this->sid){?> checked="checked"<?php } ?>/>
						
						<span class="ipt_check  checkall">
							<span class="points">全部</span>
							<i class="check"></i>
						</span>
						<input type="checkbox" name="allresolution" style="display:none;" class="checkall" value="全部"/>
						
						
					</td>
				</tr>
			</tbody>
		</table>
		<div class="info_line"><h3 id="part2">2.程序相关介绍</h3></div>
			<table class="table updata_tab">
				<tbody>
                                    
                      <tr>
                    <td class="apply_label"><em class="must">*</em>软件评分：</td>
                    <td>
                        <select  id="score" name="score" >
                            <option value="1" <?php if($this->result['score']==1){?>selected<?php } ?> >一星</option>
                            <option value="2" <?php if($this->result['score']==2){?>selected<?php } ?> >二星</option>
                            <option value="3" <?php if($this->result['score']==3){?>selected<?php } ?> >三星 </option>
                            <option value="4" <?php if($this->result['score']==4){?>selected<?php } ?> >四星</option>
                            <option value="5" <?php if($this->result['score']==5){?>selected<?php } ?>>五星</option>
                        </select>
                        
                        软件类型：
                        <select  id="dedesofttype" name="dedesofttype" >
                            <option value="1" <?php if($this->result['dedesofttype']==1){?>selected<?php } ?> >国产软件</option>
                            <option value="2" <?php if($this->result['dedesofttype']==2){?>selected<?php } ?> >国外软件</option>
                        </select>
                        
                        界面语言：
                        <select  id="dedelanguage" name="dedelanguage" >
                            <option value="1" <?php if($this->result['dedelanguage']==1){?>selected<?php } ?> >简体中文</option>
                            <option value="2" <?php if($this->result['dedelanguage']==2){?>selected<?php } ?> >英文软件</option>
                            <option value="3" <?php if($this->result['dedelanguage']==3){?>selected<?php } ?> >繁体中文</option>
                            <option value="4" <?php if($this->result['dedelanguage']==4){?>selected<?php } ?> >其它类型</option>
                        </select>
                    </td>
                 </tr>
                 
				<tr>
				    <td class="apply_label"><em class="must">*</em>截图：</td>
					<td>
                        <div class="chose_file">
                            <div id="filePictures"></div>
                            <div id="uploadpicture">
                                <input type="text" size="10"   id="images" name="images" >
                            </div> 
                        </div>
                        <p class="f_prompt"><i class="icon i_s_plaint"></i>注意：请上传3-5张清晰无水印截图的！图片规格只能为【<b>320*480,480*800,480*854,640*960,1024*600,480*320,800*480,854*480,960*640,600*1024</b>】！记住千万不要上传带手机外壳的图片。</p>
						<p class="f_prompt">特别提醒：需要横屏展示的图片请以横屏正视角的图片上传!</p>
                        <div class="upload_img_area" >
                          <input type="hidden" name="copysta" value="0">
                            <ul class="clearfix" id="picturelist">
						<?php if(is_array($this->softimgArr))foreach($this->softimgArr as $key=>$softimgs):?>
    						<li id="picnum<?php echo  $softimgs['id'];?>">
    						<img src="<?php echo $this->Randimg(trim($softimgs['path']));?>" width="120px" height="180px" />
                            <input class="pic" type="hidden" value="<?php echo $softimgs['id'];?>" name="picid[]"  >
                            <input class="pic" type="hidden" value="<?php echo $softimgs['path'];?>" name="picimg[]"  >
                            <input class="pic" type="hidden" value="<?php echo $softimgs['dedeid'];?>" name="picdedeid[]"  >
                            <a class="icon del_ico" onclick = "delimages(this,<?php echo  $softimgs['id'];?>)">删除</a>
                           	<div class="type_sel cover_seting">
                           	<input class="ordersnums" type="hidden" size="3" value="<?php echo $softimgs['orders'];?>" name="orders[]">
								<input type="radio" name="photofront" value="<?php echo $softimgs['path'];?>" <?php if($this->sid&&$key==0):?>checked="checked"<?php endif;?> <?php if($softimgs['path']==$this->result['surface']):?>checked="checked"<?php endif;?> >
								<em class="radio_icon <?php if($softimgs['path']==$this->result['surface']):?>radio_cur<?php endif;?> <?php if($this->sid&&$key==0):?>radio_cur<?php endif;?>"  ></em>
								<span class="mr10">封面</span>&nbsp;&nbsp;&nbsp;&nbsp;
								<span title="上一个" onclick="PrevImage(<?php echo  $softimgs['id'];?>)" class="icon ico_prev">上一个</span>
								<span title="下一个" onclick="NextImage(<?php echo  $softimgs['id'];?>)" class="icon ico_next">下一个</span>
							</div>
                            </li>      
                        <?php endforeach;?>
                        
			</ul>
							<input type="hidden" name="nowpicnums" id="nowpicnums" value="0" >
						</div>
                    </td>
                </tr>
                
                <tr>
                    <td class="apply_label">前台焦点图横屏(管理后台)：</td>
			        <td>
                             <span class="ipt_check">
                            <span class="points">支持</span>
			    <i class="check<?php if($this->result['thumbimgage']=='1'){?> check_on<?php }?>"></i>
			    </span>
			    <input type="checkbox" style="display:none;" name="thumbimgage" id="thumbimgage" value="1" <?php if($this->result['thumbimgage']=='1'){?> checked="checked"<?php }?>/>
                     </td>
                </tr>
                
                <tr>
                    <td class="apply_label">截图复制：</td>
                    <td>
                        <input type="text" name="changeaid" id="changeaid" value="" class="ipt"  size="30" placeholder="请输入替换截图的软件ID"> 
                        <input id="copybut" type="button" value="开始复制" onclick="copypic(<?php echo $this->result['id']?>)" />
                    </td>
                 </tr>
                
                 

                
                  <tr>
		  <td class="apply_label"><em class="must">*</em>一句话描述：</td>
                    <td>
                        <input type="text" name="recommend" id="recommend" value="<?php echo $this->result['recommend']?>" style="width:300px" class="ipt"  size="30"> 
                        <span id="msg_recommend"></span>
                        <span id="recommend_tips" class="tips"></span>
                        <input id='recommend_num' type="hidden" value='0' />
                        <p class="f_prompt"><i class="icon i_s_plaint"></i>将显示在网站上，同时作为编辑审核的重要依据，编辑能会修改它</p>
                    </td>
                 </tr>
                 
                 
                 <tr>
                    <td class="apply_label">小编说两句</td>
			<td >
			<div class="editor">
                            <textarea name="editersay" id="editersay"  style="width: 700px; height:200px"><?php echo ($this->result['editersay']!='null')?$this->result['editersay']:'';?></textarea>
                        </div>
                        <span  class="f_prompt" id="msg_editersay"></span>                      
                    </td>
                </tr> 
                 
                 
                                  <tr>
				    <td class="apply_label"><em class="must">*</em>TAG（关键词）：</td>
					<td>
                        <input type="text" name="tag" id="tag"  style="width:300px"  value="<?php echo $this->result['tag']?>"  size="30" class="ipt">
                        <span id="msg_tag"></span>
			   <p class="f_prompt"><i class="icon i_s_plaint"></i>请输入对程序最相关的几个关键词，用逗号分隔，不相关的将不予通过。</p>
                    </td>
                </tr>  
                <tr>
                    <td class="apply_label">发布时间：</td>
                    <td>
            	        <input id="created" class="ipt"  type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="created" value="<?php echo date('Y-m-d H:i:s',($this->result['created'])?$this->result['created']:time()); ?>">
                    </td>
                </tr>

                 
                <tr>
                    <td class="apply_label"><em class="must">*</em>简介：</td>
			<td>
                        <div class="editor">
                            <textarea name="introduction" id="introduction"  style="width: 700px; height:300px"><?php echo $this->result['introduction']?></textarea>   
                            <span class="f_prompt" id="msg_introduction"></span>
                        </div>                        
                    </td>
                </tr> 
                
                <tr>
                    <td class="apply_label">更新信息：</td>
			<td id="updateinfo_td">
			<div class="editor">
                            <textarea name="updateinfo" id="updateinfo"  style="width: 700px; height:300px"><?php echo $this->result['updateinfo']?></textarea>
                        </div>
                        <span  class="f_prompt" id="msg_updateinfo"></span>                      
                    </td>
                </tr> 
                 
                <tr>
                    <td class="apply_label">前台下载量：</td>
                    <td>
            	        <input id="frontdownload"  style="width:100px" class="ipt" type="text"  name="frontdownload" value="<?php echo $this->result['frontdownload']; ?>">
                        真实下载量：
                        <input id="backdownload"  style="width:100px" class="ipt" type="text"  name="backdownload" value="<?php echo $this->result['backdownload']; ?>">
                    必备排行：
                    <input id="necessary"  style="width:100px" class="ipt" type="text"  name="necessary" value="<?php echo $this->result['necessary']; ?>">
                    推荐排行：
                     <input id="recommendation"  style="width:100px" class="ipt" type="text"  name="recommendation" value="<?php echo $this->result['recommendation']; ?>">
                     评选总票数：
                     <input id="ticket2012"  style="width:100px" class="ipt" type="text"  name="ticket2012" value="<?php echo $this->result['ticket2012']; ?>">
                    
                    </td>
                </tr>
               
                <!-- 自定义属性 -->
                <tr>
                    <td class="apply_label">自定义属性：</td>
                    <td>
                        <input class='np' type='checkbox' name='attribute[]' id='attributec' value='c' <?php echo preg_match('/c/is', $this->result['attribute']) ? 'checked="checked"' : '';?> /><label for="attributec">推荐【电子市场列表】[c]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributes' value='s' <?php echo preg_match('/s/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributes">木蚂蚁汉化【电子市场】[s]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributej' value='j' <?php echo preg_match('/j/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributej">金蛋【电子市场首页】[j]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributeb' value='b' <?php echo preg_match('/b/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributeb">首发【电子市场首页】[b]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>
                         <input class='np' type='checkbox' name='attribute[]' id='attributer' value='r' <?php echo preg_match('/r/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributer">热门【电子市场首页】[r]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributed' value='d' <?php echo preg_match('/d/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributed">精华【电子市场首页】[d]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributee' value='e' <?php echo preg_match('/e/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributee">推荐【电子市场首页】[e]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributea' value='a' <?php echo preg_match('/a/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributea">装机必备[a]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>
                         <input class='np' type='checkbox' name='attribute[]' id='attributex' value='x' <?php echo preg_match('/x/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributex">合作[x]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributef' value='f' <?php echo preg_match('/f/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributef">首页推荐[f]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                         <input class='np' type='checkbox' name='attribute[]' id='attributeh' value='h' <?php echo preg_match('/h/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributeh">头条[h]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributep' value='p' <?php echo preg_match('/p/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributep">图片[p]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='attribute[]' id='attributei' value='i' <?php echo preg_match('/i/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributei">焦点图【电子市场首页】[i]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                         <input class='np' type='checkbox' name='attribute[]' id='attributep' value='k' <?php echo preg_match('/k/is', $this->result['attribute']) ? 'checked="checked"' : '';?>/><label for="attributep">汉化精华[k]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/> 
		                
		                  属性排序（越大越靠前）：
		                 <input name="marketsort" type="text" id="marketsort" style="width:100px" class="ipt" size="10" value="<?php echo $this->result['marketsort']?>" />  
		                 <br/>
		                 金蛋ID号(金蛋标识必须填写)：
		                 <input name="appid" type="text" id="appid" size="10" style="width:100px" class="ipt" value="<?php echo $this->result['appid']?>" />
                    </td>
                </tr>
                <!-- 自定义属性 -->

                <!-- 推广范围属性-->
                <tr>
                    <td class="apply_label">推广范围属性：</td>
                    <td>
                         <input class='np' type='checkbox' name='ext_attribute[]' id='ext_attributea' value='a' <?php echo preg_match('/a/is', $this->result['ext_attribute']) ? 'checked="checked"' : '';?> /><label for="ext_attributea">【合作页面，包括：首页中部（8个），展示页（6个）】[a]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='ext_attribute[]' id='ext_attributeb' value='b' <?php echo preg_match('/b/is', $this->result['ext_attribute']) ? 'checked="checked"' : '';?>/><label for="ext_attributeb">【网站全站头部（4个）】[b]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='ext_attribute[]' id='ext_attributec' value='c' <?php echo preg_match('/c/is', $this->result['ext_attribute']) ? 'checked="checked"' : '';?>/><label for="ext_attributec">【展示页右侧（6个）】[c]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>
                         <input class='np' type='checkbox' name='ext_attribute[]' id='ext_attributed' value='d' <?php echo preg_match('/d/is', $this->result['ext_attribute']) ? 'checked="checked"' : '';?>/><label for="ext_attributed">【论坛头部（9个）】[d]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='ext_attribute[]' id='ext_attributee' value='e' <?php echo preg_match('/e/is', $this->result['ext_attribute']) ? 'checked="checked"' : '';?>/><label for="ext_attributes">【游戏频道中部推荐区（9个）】[e]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='ext_attribute[]' id='ext_attributef' value='f' <?php echo preg_match('/f/is', $this->result['ext_attribute']) ? 'checked="checked"' : '';?>/><label for="ext_attributef">【手机版（3个）】[f]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='ext_attribute[]' id='ext_attributeg' value='g' <?php echo preg_match('/g/is', $this->result['ext_attribute']) ? 'checked="checked"' : '';?>/><label for="ext_attributeg">【瀑布流推广】[g]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     </td>
                </tr>
               <!--推广范围属性-->

               <!-- 禁止输出属性-->
                <tr>
                    <td class="apply_label">禁止输出属性：</td>
                    <td>
                         <input class='np' type='checkbox' name='cooper_state[]' id='cooper_statea' value='a' <?php echo preg_match('/a/is', $this->result['cooper_state']) ? 'checked="checked"' : '';?> /><label for="cooper_statea">【豌豆荚】[a]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='cooper_state[]' id='cooper_stateb' value='b' <?php echo preg_match('/b/is', $this->result['cooper_state']) ? 'checked="checked"' : '';?>/><label for="cooper_stateb">【魔乐】[b]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='cooper_state[]' id='cooper_statec' value='c' <?php echo preg_match('/c/is', $this->result['cooper_state']) ? 'checked="checked"' : '';?>/><label for="cooper_statec">【腾讯QQ】[c]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='cooper_state[]' id='cooper_stated' value='d' <?php echo preg_match('/d/is', $this->result['cooper_state']) ? 'checked="checked"' : '';?>/><label for="cooper_stated">【玩转手机】[d]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input class='np' type='checkbox' name='cooper_state[]' id='cooper_statee' value='e' <?php echo preg_match('/e/is', $this->result['cooper_state']) ? 'checked="checked"' : '';?>/><label for="cooper_states">【奇虎360】[e]</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>
                    </td>
                </tr>
               <!--禁止输出属性-->
                 
		
                
              <tr>
                    <td class="apply_label">有无插件：</td>
			        <td>
                         <span class="ipt_check">
						    <span class="points">有</span>
							<i class="check"></i>
						</span>
						<input type="checkbox" style="display:none;" name="plugin" id="plugin" value="1" />
                    多国语言： <span class="ipt_check">
						   <span class="points"> 支持</span>
							<i class="check"></i>
						</span>
						<input type="checkbox" style="display:none;" name="language" id="language" value="1" />
                    横竖屏兼容： <span class="ipt_check">
						   <span class="points">支持</span>
							<i class="check"></i>
						</span>
						<input type="checkbox" style="display:none;" name="screen" id="screen" value="1"/>
                   
                                </td>
                </tr>
                           
                <tr>
			<td class="apply_label">海报：</td>
					<td>
                        <div class="dib chose_file">
                            <div id="fileposter"></div>
                            <div id="uploadposter">
                                <input type="text" size="10"   id="poster" name="poster" >
                                <input type="hidden" id="posterfilename" name="posterfilename">
                            </div>
                        </div>
                        <span class="f_prompt"><i class="icon i_s_plaint"></i>可上传单张图片；多张请以压缩包上传；上传海报更有机会被首页推荐。</span>
                        <div class="upload_img_area" >
			<p class="mt20" id="posterlist"></p>
						</div>
                    </td>
					<td></td>
                </tr>
                
                <tr>
			<td class="apply_label">焦点图片列表：</td>
					<td>
                        <div class="dib chose_file">
                            <div id="filefoucsimg"></div>
                            <div id="uploadfoucsimg">
                                <input type="text" size="10"   id="foucsimg" name="foucsimg" >
                                <input type="hidden" id="foucsimgfilename" name="foucsimgfilename">
                            </div>
                        </div>
                        <span class="f_prompt"><i class="icon i_s_plaint"></i>可上传单张首页或手机焦点图片。</span>
                        <div class="upload_img_area" >
			<p class="mt20" id="foucsimglist"> </p>
			</div>
                    </td>
                    <td></td>
                </tr>
                 <tr>
			<td class="apply_label">焦点图片列表规格：</td>
			<td>
                              <span class="ipt_check">
						   <span class="points">320*154</span>
							<i class="check check_on"></i>
						</span>
                           <input type="checkbox" value="320*154" style="display:none;" checked="checked" name="focusimgtype[]">
                           
                             <span class="ipt_check" >
						   <span class="points">179*86 </span>
							<i class="check"></i>
						</span>
                           <input type="checkbox" value="179*86" style="display:none;" name="focusimgtype[]">
                    </td>
		<td></td>
                </tr>
               
                
                <tr>
			<td class="apply_label">电子市场手机图片：</td>
					<td>
                        <div class="dib chose_file">
                            <div id="filemobileimg"></div>
                            <div id="uploadmobileimg">
                                <input type="text" size="10"   id="mobileimg" name="mobileimg" >
                                <input type="hidden" id="mobileimgfilename" name="mobileimgfilename">
                            </div>
                        </div>
                        <span class="f_prompt"><i class="icon i_s_plaint"></i>可上传单张电子市场手机图片。</span>
                        <div class="upload_img_area" >
			<p class="mt20" id="mobileimglist"></p>
						</div>
                    </td>
					<td></td>
                </tr>

                <tr>
				    <td class="apply_label">有无数据包：</td>
					<td>
                        <span class="ipt_check" id="datapacket_have">
						   <span class="points">有</span>
							<i class="check"></i>
						</span>
						<input type="checkbox" name="datapacket_have" style="display:none;" value="1" />
                        <div id="controlDown" style="display:none" >
                        	<input name="nownums" type="hidden" id="nownums"   value="2" >
                            <table border="0" cellspacing="0" cellpadding="0" id="defaultrow">
                                <tr height="36" id="timerow1"><td>&nbsp;<input type="text" class="ipt" value="http://" name="datapacket[]"></td><td>&nbsp;<input type="text" onclick="packettitleprompt('1');" value="这里是数据包标题" class="ipt" size="20" name="datapackettitle[]"></td><td><em onclick="delTables('1');" class="ml20 icon del_ico">删除</em></td></tr>
                            </table>
                            <table border="0" cellspacing="0" cellpadding="0" >
                                <tr>
                                    <td>
                                        <p><i class="icon i_add"></i><a  class="points" onClick="addTables();">添加一条</a></p>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
 
                <tr>
			<td class="apply_label">相关视频：</td><td>
                        <span class="ipt_check" id="video_have">
						    <span class="points">有</span>
							<i class="check"></i>
						</span>
						<input type="checkbox" name="video_have" style="display:none;" value="1" />
                        <div id="controlDown_video" style="display:none">
                        	<input name="videos" type="hidden" id="videos"   value="2" >
                            <table border="0" cellspacing="0" cellpadding="0" id="videotrow">
                                 <tr id="videorow1"><td>&nbsp;<input type="text" value="http://" class="ipt" name="video[]"></td><td>&nbsp;<input type="text" onclick="packetprompt('1');" value="这里是视频标题" class="ipt" name="videotitle[]"></td><td> <em onclick="delTables_video('1');" class="ml20 icon del_ico">删除</em></td></tr>
                            </table>
                            <table border="0" cellspacing="0" cellpadding="0" >
                                <tr>
                                    <td>
                                       <p><i class="icon i_add"></i><a  class="points" onClick="addTables_video();">添加一条</a></p>	
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>

              
				<tr>
				    <td class="apply_label"></td>
					<td>
					 	<input type="submit" class="btn btn5" style="margin-left:0px"  value="发布软件" />
                    </td>
                </tr>
				</tbody>
			</table>
			</form>
	    </div>
	<div class="clear"></div>
  </div>
<script type="text/javascript" src="<?php echo $this->BaseUrl;?>/public/js/plugin/jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript" src="<?php echo $this->BaseUrl;?>/public/js/plugin/layer/jquery.layer.js"></script>
<script type="text/javascript" src="<?php echo $this->BaseUrl;?>/public/js/plugin/jquery.form.js"></script>
<script type="text/javascript" src="<?php echo $this->BaseUrl;?>/public/js/plugin/tinymce/tiny_mce.js"></script>
<link href="<?php echo $this->BaseUrl;?>/public/js/plugin/suggest/style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo $this->BaseUrl;?>/public/js/plugin/suggest/jquery.suggest.js"></script>
<script type="text/javascript" src="<?php echo $this->BaseUrl;?>/public/js/plugin/jquery.validate.js"></script>
<script type="text/javascript" src="<?php echo $this->BaseUrl;?>/public/<?php echo $this->module;?>/<?php echo $this->template;  ?>/js/soft.js"></script>
<script type="text/javascript">
function checkadd()
{
var introstr = tinyMCE.get('introduction').getContent();
    $("#introduction").val(introstr);
var updatestr = tinyMCE.get('updateinfo').getContent();
    $("#updateinfo").val(updatestr);
}  
//选取文件的函数，后台特有
tinyMCE.init({
    // General options
	language :"cn",
    mode : "textareas",
    theme : "advanced",
    plugins : "paste,media",
    // Theme options
    theme_advanced_buttons1 : "pastetext,|,code,|,forecolor,|,bold,|,link,|,unlink",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,

    // Skin options
    skin : "o2k7",
    skin_variant : "silver",

    // Drop lists for link/image/media/template dialogs
    template_external_list_url : "js/template_list.js",
    external_link_list_url : "js/link_list.js",
    external_image_list_url : "js/image_list.js",
    media_external_list_url : "js/media_list.js"
});                   

function $Nav()
{
	if(window.navigator.userAgent.indexOf("MSIE")>=1) return 'IE';
	else if(window.navigator.userAgent.indexOf("Firefox")>=1) return 'FF';
	else return "OT";
}
                                

function SelectSoft()
{
    var ftpdir = $("#softurl1").val();
	if($Nav()=='IE'){ var posLeft = window.event.clientX-200; var posTop = window.event.clientY-50; }
	else{ var posLeft = 100; var posTop = 100; }
	window.open("/admin/soft/selectsoft?fipdir="+ftpdir, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left="+posLeft+", top="+posTop);
}


function getlargefile()
{
	var url = $("#softurl1").val();
    if(!url){
        alert("请输入抓取地址！");return false;
    }
    $("#loadimg").show();
    $.getJSON("http://apktool.mumayi.com/apkinfo/ftpget.php?callback=?", {url: url},
    function(data){
         $("#softurl1").val(data.fileurl);
         alert('抓取成功！');
         
                            $('#photolists').html('');
		                    $('#photolists').append(data.apkinfo);
			               	$('#downloadurl_url').val(data.downloadurl);
                            $('#downloadurlto').val(data.downloadurlto);
                            $('#datedir').val(data.datedir); 
							$('#apk_filename').val(data.filename);
							$('#packagename').val(data.package);
		                    $('#versionname').val(data.versionname);
		                    $('#versioncode').val(data.versioncode);
		                    $('#sdkversion').val(data.sdkversion);
		                    $('#permission').val(data.apkpermission);
		                    $('#apkad').val(data.apkad);	
							$('#adcanal').val(data.adcanal);
		                    $('#md5').val(data.md5);
                            $('#dedemd5').val(data.md5);
		                    $('#signmd5').val(data.signmd5);
		                    $('#signsha1').val(data.signsha1);
		                    $('#softsize').val(data.softsize);
		                    $("#apk_filename").removeClass("error_box");
		        			$("#msg_apk_filename").html('');
							$('#adinfo').html(data.admessage);
         
         $("#loadimg").hide();
    }, "jsonp");
}


function getyfile()
{
	var url = $("#softurl1").val();
    if(url){
        var geturl = "http://apktool.mumayi.com/apkinfo/getfile.php?url="+encodeURIComponent(url);
        window.open (geturl) 
    }else{
        alert("请输入抓取地址！");
    }
     
}

function focus_v()
{
	var url = $("#softurl1").val();
    $("#downloadurl_url").val(url); 
}


function ReturnsoftValue()
{
	var url = $("#softurl1").val();
    var url2 = $("input[name=download]").val();
    if(!url){
        url = url2;
    }
	$("#loadimg").show();
    $.getJSON("http://apktool.mumayi.com/apkinfo/ftpgetapkinfo.php?callback=?", {url: url},
    function(data){
         alert('获取成功！');
                            $('#photolists').html('');
		                    $('#photolists').append(data.apkinfo);
			               	$('#downloadurl_url').val(data.downloadurl);
                            $('#downloadurlto').val(data.downloadurlto);
                            $('#datedir').val(data.datedir); 
							$('#apk_filename').val(data.filename);
							$('#packagename').val(data.package);
		                    $('#versionname').val(data.versionname);
		                    $('#versioncode').val(data.versioncode);
		                    $('#sdkversion').val(data.sdkversion);
		                    $('#permission').val(data.apkpermission);
		                    $('#apkad').val(data.apkad);
							$('#adcanal').val(data.adcanal);	
		                    $('#md5').val(data.md5);
                            $('#dedemd5').val(data.md5);
		                    $('#signmd5').val(data.signmd5);
		                    $('#signsha1').val(data.signsha1);
		                    $('#softsize').val(data.softsize);
		                    $("#apk_filename").removeClass("error_box");
		        			$("#msg_apk_filename").html('');
							$('#adinfo').html(data.admessage);
         
         $("#loadimg").hide();
    }, "jsonp");
}

function copypic(oldid){
    var id = $("#changeaid").val();
    if(id){
        $("#copybut").attr({"disabled":"disabled"});
        $("#copybut").val("替换中...");
        $.getJSON("/admin/soft/copypic", {'id':id,'oldid':oldid},
            function(data){
                if(data.status){
                    $("#copybut").val("继续复制");
                    $("input[name='copysta']").val(1);
                    $("#copybut").removeAttr("disabled");
                    $('#picturelist').html('');
                    $('#picturelist').append(data.message);
                    showButton();
                }else{
                    $("#copybut").val("替换失败！");
                    
                }
        }, "json");
    }else{
        alert("请输入要复制的软件ID!");
    }
}

function getlargefile163()
{
    var url = $("#softurl1").val();
    if(!url){
        alert("请输入抓取地址！");return false;
    }
    $("#loadimg").show();
	
	$.post("/dev/curl_get_largefile.php", { url: url },function(data){
         $("#softurl1").val(data);
         $("#downloadurl_url").val(data);
         alert('获取成功！请选取！');
   });
   $("#loadimg").hide();
}

function getFtpDir(dir){
    $("#loadimg").show();
    $.post('/admin/soft/ftpdir',{dir:dir},function(response){
        if(response.status){
            $.layer({v_msgtype:11,v_btns:0,v_msg:response.message,v_shade:false,v_title:'FTP目录信息',v_area : ['800px','400px'],}); 
        }
    },'json')
    $("#loadimg").hide();
}

function ftpdirurl(ftpurl){
    var turl = '/data/mumayi'+ftpurl;
    $("#softurl1").val(turl);
    $("#loadimg").show();
            $.getJSON("http://apktool.mumayi.com/apkinfo/ftpgetapkinfo.php?callback=?", {url: turl},
            function(data){
                                    $('#photolists').html('');
                                    $('#photolists').append(data.apkinfo);
                                    $('#downloadurl_url').val(data.downloadurl);
                                    $('#downloadurlto').val(data.downloadurlto);
                                    $('#datedir').val(data.datedir); 
                                    $('#apk_filename').val(data.filename);
                                    $('#packagename').val(data.package);
                                    $('#versionname').val(data.versionname);
                                    $('#versioncode').val(data.versioncode);
                                    $('#sdkversion').val(data.sdkversion);
                                    $('#permission').val(data.apkpermission);
                                    $('#apkad').val(data.apkad);	
									$('#adcanal').val(data.adcanal);
                                    $('#md5').val(data.md5);
                                    $('#dedemd5').val(data.md5);
                                    $('#signmd5').val(data.signmd5);
                                    $('#signsha1').val(data.signsha1);
                                    $('#softsize').val(data.softsize);
                                    $("#apk_filename").removeClass("error_box");
                                    $("#msg_apk_filename").html('');
                                    $('#adinfo').html(data.admessage);
                 
                 $("#loadimg").hide();
            }, "jsonp");
}
 

        
//选取文件的函数，后台特有   
                                
$(document).ready(function(){
	/*$("#tag").suggest({
		url:'/tag/index/keyword/%s',
		paramVal:'tag',
		paramTxt:'tag',
		anytext:1
	});*/
	showButton();
    $("#downloadurl").uploadify(
        {
            scriptAccess     : 'always',
    		swf              : '<?php echo $this->BaseUrl;?>/public/js/plugin/uploadify.swf',
    		uploader         : "http://apktool.mumayi.com/apkinfo/get.php",
    		cancelImg        : '<?php echo $this->BaseUrl;?>/public/images/cancel.gif',
    		formData      : {'uid' : '<?php echo $this->uid;?>','sid' : '<?php echo $this->sid;?>','packagename' : '<?php echo $this->packagename;?>'},
     		removeTimeout 	 : 0,
            queueID          : 'fileQueue',
            method		     : 'POST',
            fileTypeDesc	 : '注意:您只能上传apk格式的文件!',
            fileTypeExts	 : '*.apk;',
            buttonText       : '上传apk',
		    buttonImage	 	 : '<?php echo $this->BaseUrl;?>/public/images/apk.png',
		    buttonClass      : '',
            width			 : '168',
            height		     : '40',	
            auto             : true,
            onSelect : function(file) {
            	$('#photolists').html('');
        		$('#downloadurl').val('');
        		$('#apk_filename').val('');
        		$('#apk').html('');
            }, 
            onUploadError 	: function(file, errorCode, errorMsg, errorString) {
                alert('文件：' + file.name + ' 不能上传,出错: ' + errorString);
            },
            onUploadSuccess  : function(file, data, response) {
                    {
	                    var response=eval("("+data+")");
	                   
	                    if(response.status){
	                    	$('#photolists').html('');
		                    $('#photolists').append(response.apkinfo);
			               	$('#downloadurl_url').val(response.downloadurl);
                            $('#downloadurlto').val(response.downloadurlto);
                            $('#datedir').val(response.datedir); 
							$('#apk_filename').val(response.filename);
							$('#packagename').val(response.package);
		                    $('#versionname').val(response.versionname);
		                    $('#versioncode').val(response.versioncode);
		                    $('#sdkversion').val(response.sdkversion);
		                    $('#permission').val(response.apkpermission);
		                    $('#apkad').val(response.apkad);
							$('#adcanal').val(response.adcanal);	
		                    $('#md5').val(response.md5);
                            $('#dedemd5').val(response.md5);
		                    $('#signmd5').val(response.signmd5);
		                    $('#signsha1').val(response.signsha1);
		                    $('#softsize').val(response.softsize);
		                    $("#apk_filename").removeClass("error_box");
		        			$("#msg_apk_filename").html('');
							$('#adinfo').html(response.admessage);
		                } else {
		                	if(response.tips){
		            			$.layer({
		                			v_title:'发布应用',
		                			v_msg:response.message,
		                			v_btns:response.button,
		                			v_shade:false,
		            				v_btn:[response.submit,response.cancel],
		            				v_area:['410px','220px'],
		            				yes:function(){
		            					layer_close(true);
		            					if(response.submiturl){
		            						location.href =response.submiturl;
		            					}
		            				},
		            				no:function(){
		            					layer_close(true);
		            					if(response.cancelurl){
		            						location.href =response.cancelurl;
		            					}
		            				}
		            			});
		            		}
			 	        }

	                }
        }
         
    });

    $("#icon").uploadify(
        {
    		swf              : '<?php echo $this->BaseUrl;?>/public/js/plugin/uploadify.swf',
    		uploader         : "<?php echo $this->urls('icon','upload','admin');?>",
    		cancelImg        : '<?php echo $this->BaseUrl;?>/public/images/cancel.gif',
    		formData      : {'uid' : '<?php echo $this->uid;?>'},
            queueID          : 'fileIcon',
            method	         : 'POST',
            removeTimeout 	 : 0,
            fileTypeDesc	 : '注意:您只能上传png格式的文件!',
            fileTypeExts	 : '*.png;',
		    buttonImage	 	 : '<?php echo $this->BaseUrl;?>/public/images/upload_file.png',
            width			 : '100',
            height		     : '35',	
            auto             : true,
            onUploadSuccess  : function(file, data, response) {
                {
                    var response=eval("("+data+")");
                    if(response.status){
                        $('#iconlists').html('<img src='+response.message+'    width="36"   height="36" >');  
                        $('#icon_url').val(response.message);
						$("#msg_icon_filename").html(''); 	
    				} else {
                        $('#iconlists').html('<font color="red">'+response.message+'</font>');
				    }
                }
         }
       
     });

     $("#images").uploadify(
        {
        	swf              : '<?php echo $this->BaseUrl;?>/public/js/plugin/uploadify.swf',
        	uploader         : "<?php echo $this->urls('softpicture','upload','admin');?>",
    		cancelImg        : '<?php echo $this->BaseUrl;?>/public/images/cancel.gif',
    		formData      : {'uid' : '<?php echo $this->uid;?>'},
     		removeTimeout    : 0,
            queueID          : 'filePictures',
            method		     : 'POST',
            fileTypeDesc     : '注意:您只能上传jpeg,png,gif,zip格式的文件!',
	        fileTypeExts     : '*.jpg;*.jpeg;*.gif;*.png',
		    buttonImage	     : '<?php echo $this->BaseUrl;?>/public/images/upload_file.png',
            width		     : '100',
            height		     : '35',	
            auto             : true,
            multi            : true,
            onUploadSuccess  : function(file, data, response) {
                {
		            var response=eval("("+data+")");
		 	        if(response.status){
						var picnum=$("#nowpicnums").val();
						var str='<li id=picnum'+picnum+'>'+response.head+'<a class="icon del_ico" onclick="delimages(this,'+picnum+')">删除</a>\
						<br>'+response.end+'<em class="radio_icon"></em>\
						<span class="mr10">封面</span>&nbsp;&nbsp;&nbsp;&nbsp;\
						<span title="上一个" onclick="PrevImage('+picnum+')" class="icon ico_prev">上一个</span>\
						<span title="下一个" onclick="NextImage('+picnum+')" class="icon ico_next">下一个</span>\
						</div></li>';
                                                $('#picturelist').append(str);
                                                $("#filePictures").html('');
						$('#msg_pic').html('');
						$("#nowpicnums").val(parseInt(parseInt(picnum)+1));
		 	        } else {
			 	       $.layer({v_title:'出错提示',v_msg:response.message,v_shade:false,v_btns:1,v_area:['410px','220px']});
			 	}
                 }
          },
          onUploadStart : function(file) {
        	  var imgsize = $("#picturelist").find("img").size();
        	  if(parseInt(imgsize)>=6){
        		  $.layer({
        				v_msg:'对不起，您只能上传最多6张图片!',
        				v_shade:false,
        				v_title:'图片超过',
        				v_btns:1,
        				v_btn:['确定'],
        				v_showtime:2
        		});
        		$('#images').uploadify('disable', true);
        		$('#images').uploadify('stop');
        		$('#images').uploadify('cancel');
              }
              
          }, 
          onQueueComplete : function(queueData) {
        	  showButton();
          }
	});

     $("#poster").uploadify(
 	        {
 	        	swf              : '<?php echo $this->BaseUrl;?>/public/js/plugin/uploadify.swf',
 	        	uploader         : "<?php echo $this->urls('poster','upload','admin');?>",
 	    		cancelImg        : '<?php echo $this->BaseUrl;?>/public/images/cancel.gif',
 	    		formData      : {'uid' : '<?php echo $this->uid;?>'},
 	     		removeTimeout    : 0,
 	            queueID          : 'fileposter',
 	            method		     : 'POST',
 	            fileTypeDesc     : '注意:您只能上传jpeg,png,gif,zip格式的文件!',
 	            fileTypeExts     : '*.jpg;*.jpeg;*.gif;*.png;*.zip',
 			    buttonImage	     : '<?php echo $this->BaseUrl;?>/public/images/upload_file.png',
 	            width		     : '100',
 	            height		     : '35',	
 	            auto             : true,
 	            multi            : true,
 	            onUploadSuccess  : function(file, data, response) {
 	                {
 			            var response=eval("("+data+")");
 			 	        if(response.status){
 				 	        $('#posterlist').html(response.message);
 				 	        $("#fileposter").html('');
 				 	        } else {
 					 	        $("#posterlist").html(response.message);
 					 	    }
 	                 }
 	          }
 	});
        
        
        $("#foucsimg").uploadify(
 	        {
                    swf              : '<?php echo $this->BaseUrl;?>/public/js/plugin/uploadify.swf',
                    uploader         : "<?php echo $this->urls('poster','upload','admin');?>",
                    cancelImg        : '<?php echo $this->BaseUrl;?>/public/images/cancel.gif',
                    formData      : {'uid' : '<?php echo $this->uid;?>'},
                    removeTimeout    : 0,
 	            queueID          : 'fileposter',
 	            method		     : 'POST',
 	            fileTypeDesc     : '注意:您只能上传jpeg,png,gif,zip格式的文件!',
 	            fileTypeExts     : '*.jpg;*.jpeg;*.gif;*.png;*.zip',
 			    buttonImage	     : '<?php echo $this->BaseUrl;?>/public/images/upload_file.png',
 	            width		     : '100',
 	            height		     : '35',	
 	            auto             : true,
 	            multi            : true,
 	            onUploadSuccess  : function(file, data, response) {
 	                {
 			            var response=eval("("+data+")");
 			 	        if(response.status){
 				 	        $('#foucsimglist').html(response.imgsrc+'<a onclick="delFoucsimg(0)" class="icon del_ico">删除</a>');
                                                $('#foucsimgfilename').val(response.imgname);
 				 	        $("#filefoucsimg").html('');
 				 	   } else {
 					 	$("#foucsimglist").html(response.message);
 					   }
 	                 }
 	          }
 	});
       
        $("#mobileimg").uploadify(
 	        {
 	        	swf              : '<?php echo $this->BaseUrl;?>/public/js/plugin/uploadify.swf',
 	        	uploader         : "<?php echo $this->urls('poster','upload','admin');?>",
 	    		cancelImg        : '<?php echo $this->BaseUrl;?>/public/images/cancel.gif',
 	    		formData      : {'uid' : '<?php echo $this->uid;?>'},
 	     		removeTimeout    : 0,
 	            queueID          : 'fileposter',
 	            method		     : 'POST',
 	            fileTypeDesc     : '注意:您只能上传jpeg,png,gif,zip格式的文件!',
 	            fileTypeExts     : '*.jpg;*.jpeg;*.gif;*.png;*.zip',
 			    buttonImage	     : '<?php echo $this->BaseUrl;?>/public/images/upload_file.png',
 	            width		     : '100',
 	            height		     : '35',	
 	            auto             : true,
 	            multi            : true,
 	            onUploadSuccess  : function(file, data, response) {
 	                {
 			            var response=eval("("+data+")");
 			 	        if(response.status){
                                                $('#mobileimglist').html(response.imgsrc+'<a onclick="delMobileimg(0)" class="icon del_ico">删除</a>');
                                                $('#mobileimgfilename').val(response.imgname);
 				 	        $("#filemobileimg").html('');
 				 	} else {
 					 	$("#mobileimglist").html(response.message);
 					}
 	                 }
 	          }
 	});

     $("#applyform").validate({
			errorClass: "err_ipt",
			ignore: "",
			rules: { 
				'title':{
					required: true,
					minlength: 1
				},  
				'tt':{
					required: true,
					minlength: 3
				},  
				'versionname': {
					//floornum: true,
	                //equalTo:"#title",
					required: true  
	            },
	            'cid': {   
	                required: true
	            },
	            'phonesystem[]': {   
	                //required: true,
	                ischeckBox:1
	            },
	            'os[]': {
	                ischeckBox:1
	            },
	            'resolution[]': {
	                ischeckBox:1
	            },
	            'introduction': {   
	            	required: true,
	                minlength: 20
	            },
	            'recommend': {   
	                required: true,
	                maxlength: 15
	            },
	            'tag': {   
	                required: true
	            },
	            'packagename': {   
	                required: true
	            },
	            'icon_url': {   
	                required: true
	            },
	            'nowpicnums': {   
	                required: true
	            }
	        },   
	        messages: {
	            'title':{
	        		required:'<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请填写应用名称,例如：木蚂蚁电子市场.</p><span class="tip"><span class="tip_in"></span></span></span>',
	        		minlength: jQuery.format('<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>应用名称不得少于{0}个字</p><span class="tip"><span class="tip_in"></span></span></span>')
	            },
	            'versionname': {
	            	required:'<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请填写应用版本号，例如：1.0.1</p><span class="tip"><span class="tip_in"></span></span></span>',
	            	floornum:'<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请填写正确格式的应用版本号，例如：1.0.1</p><span class="tip"><span class="tip_in"></span></span></span>'
				},
				'cid': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请选择应用分类类型.</p><span class="tip"><span class="tip_in"></span></span></span>'
				},
				'phonesystem[]': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请选择支持系统的版本号.</p><span class="tip"><span class="tip_in"></span></span></span>',
					ischeckBox: jQuery.format('<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请最少选择<font color="red"> {0} </font>个选项</p><span class="tip"><span class="tip_in"></span></span></span>')
				},
				'os[]': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请选择支持系统.</p><span class="tip"><span class="tip_in"></span></span></span>',
					ischeckBox: jQuery.format('<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请最少选择<font color="red"> {0} </font>个选项</p><span class="tip"><span class="tip_in"></span></span></span>')
				},
				'resolution[]': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请选择支持设备分辨率.</p><span class="tip"><span class="tip_in"></span></span></span>',
					ischeckBox: jQuery.format('<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请最少选择<font color="red"> {0} </font>个选项</p><span class="tip"><span class="tip_in"></span></span></span>')
				},
				'introduction': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请填写简介文字信息.</p><span class="tip"><span class="tip_in"></span></span></span>',
					minlength: jQuery.format('<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>简介文字信息不得少于{0}个字</p><span class="tip"><span class="tip_in"></span></span></span>')
				},
				<?php if($this->sid != '0') {?>
				'updateinfo': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请填写更新文字信息.</p><span class="tip"><span class="tip_in"></span></span></span>',
					minlength: jQuery.format('<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>更新文字信息不得少于{0}个字</p><span class="tip"><span class="tip_in"></span></span></span>')
				},
				<?php }?>
				'recommend': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请填写一句话描述.</p><span class="tip"><span class="tip_in"></span></span></span>',
					maxlength: jQuery.format('<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>一句话描述不得多于{0}个字</p><span class="tip"><span class="tip_in"></span></span></span>')
				},
				'tag': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请填写Tag(关键词).</p><span class="tip"><span class="tip_in"></span></span></span>'
				},
				'packagename': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请上传软件包.</p><span class="tip"><span class="tip_in"></span></span></span>'
				},
				'icon_url': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请上传软件图标.</p><span class="tip"><span class="tip_in"></span></span></span>'
				},
				'nowpicnums': {
					required: '<span class="errot_tip error_font short_tips"><p class="f_prompt"><i class="icon i_error"></i>请上传软件截图.</p><span class="tip"><span class="tip_in"></span></span></span>'
				}
				
			},
			errorPlacement: function(error, element) {
				
		        if ($("#phonesystem_checkbox").has(element).size()>0 ) {
		            error.appendTo($("#phonesystem_checkbox"));
		            return true;
		        }
		        if ($("#os_checkbox").has(element).size()>0) {
		            error.appendTo($("#os_checkbox"));
		            return true;
		        } 
		        if ($("#resolution_checkbox").has(element).size()>0) {
		            error.appendTo($("#resolution_checkbox"));
		            return true;
		        }
		       
		        if ($(element).attr("name")=='tag') {
		        	$("#msg_tag").html(error);
		            return true;
		        }
		        if ($(element).attr("name")=='packagename') {
		        	error.appendTo("#apk");
		            return true;
		        }
		        if ($(element).attr("name")=='icon_url') {
		        	error.appendTo("#msg_icon_filename");
		            return true;
		        }
		        if ($(element).attr("name")=='nowpicnums') {
		        	error.appendTo("#msg_pic");
		            return true;
		        }
		        //alert($(element).closest("td").html());
		        error.insertAfter(element);
		        
		    },
			success: function(label) {
				label.html('<span class="f_prompt"><img src="/public/images/yes.gif" /></span>').addClass("success");
			},
			submitHandler: function(form) {
				jQuery(form).ajaxSubmit({
                                    target: "#result",
                                    beforeSubmit:disableForm,
                                    success:submitForm, 
                                    url:'<?php echo $this->urls('add','soft','admin');?>',       
                                    type:'post',      
                                    dataType:'json'
				});
			}
		});
               
    
	  	function disableForm(){
			$('#applyform').find("input[type='submit']").attr("disabled",true);
			$('#applyform').find("input[type='submit']").val("正在发布,请稍等...");
                        $.layer({
                            v_title:'发布中',
                            v_btns:0,
                            v_msgtype:0,
                            v_shade:true,
                            v_area : ['300px','150px'],
                            v_msg:'<div class="">\
                                        <div class="">\
                                           <font color="green">数据正在提交到服务器进行发布,<br/>请耐心等待...</font>\
                                        </div>\
                                    </div>'
                            });
			return true; 
		}

		function submitForm(responseText)  { 
			if(responseText.status){
                                        layer_close(true);
					$.layer({
						v_msg:responseText.message,
						v_title:'新版软件发布成功',
						v_btns:2,
						v_shade:false,
						v_btn:['返回列表','查看详情'],
						v_area:['410px','220px'],
						yes:function(){
							location.href ="<?php echo $this->urls('index','soft','admin',array('status'=>0));?>";
						},
						no:function(){
							location.href = responseText.url
						}
					});
			}else{
                                layer_close(true);
				if(responseText.isform){
					$.each(responseText.message,function(key,val){
						if('apk'==key){
							$("html,body").animate({scrollTop: $("#applyform").offset().top});
							$.layer({v_msg:'请上传你需要修改的软件APK包!',v_shade:false,v_title:'请上传APK包',v_showtime:2});
						}else{
							$.layer({v_msg:val.error,v_shade:false,v_title:'请上传APK包',v_showtime:2});
						}
					});
				}else{
					$.layer({v_msg:responseText.message,v_shade:false,v_title:'发布软件出错',v_showtime:2});
				}
                                $.layer({v_msg:responseText.message,v_shade:false,v_title:'发布软件出错',v_showtime:2});
				$('#applyform').find("input[type='submit']").attr("disabled",false);
				$('#applyform').find("input[type='submit']").val("提交软件");
			}
		}
		
 });	
 </script>